import http from '@/lib/http'

export interface OrderGoodsPayload {
  id?: number
  orderId?: number
  goodId: number
  count: number
  standard?: string
}

export function listOrderGoods(params?: any) {
  return http.get('/orderGoods', { params })
}

export function addOrderGoods(data: OrderGoodsPayload) {
  return http.post('/orderGoods', data)
}

export function updateOrderGoods(data: OrderGoodsPayload) {
  return http.put('/orderGoods', data)
}

export function deleteOrderGoods(idList: (number|string)[]) {
  return http.delete('/orderGoods', { params: { idList } })
}


